﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using Public;
using BUS;

namespace QuanLyKhoHangVatTu
{
    public partial class ChiTietKho : DevExpress.XtraEditors.XtraForm
    {
        Kho_BUS k_bus = new Kho_BUS();
        Kho_PB k_pb = new Kho_PB();
        public ChiTietKho()
        {
            InitializeComponent();
        }

        private void ChiTietKho_Load(object sender, EventArgs e)
        {
            Flag_PB.Flag = 2;
            gridKho.DataSource = k_bus.LayDSKho();
            
        }

        private void gridView1_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e)
        {
            Kho_PB.MaKho = gridView1.GetRowCellValue(e.FocusedRowHandle, "MAKHO").ToString();
            Kho_PB.TenKho = gridView1.GetRowCellValue(e.FocusedRowHandle, "TENKHO").ToString();
            Kho_PB.DiaChi = gridView1.GetRowCellValue(e.FocusedRowHandle, "DIACHI").ToString();
        }
    }
}